package com.sunline.poc.oozie.test.demo;

import org.apache.oozie.client.AuthOozieClient;
import org.apache.oozie.client.OozieClientException;
import org.apache.oozie.client.WorkflowAction;
import org.apache.oozie.client.WorkflowJob;

import java.util.List;
import java.util.Properties;

public class JavaWorkflowDemo1_Kill {
    private static String oozieURL = "http://n1:11000/oozie";
    public static void main(String[] args) throws OozieClientException {
        System.setProperty("java.security.krb5.conf", "D:\\Temp\\krb5.conf");
        System.setProperty("javax.security.auth.useSubjectCredsOnly", "false");
        System.setProperty("ssun.security.jgss.debug", "true"); //Kerberos Debug模式
        System.setProperty("java.security.auth.login.config", "D:\\Temp\\oozie-login-clientA.conf");
        AuthOozieClient oozieClient = new AuthOozieClient(oozieURL, AuthOozieClient.AuthType.KERBEROS.name());
        oozieClient.setDebugMode(1);

        oozieClient.kill( "0000022-190310135033298-oozie-oozi-C");
    }
}
